package com.example.covid19.controller;


import cn.hutool.json.JSONObject;
import com.example.covid19.common.lang.Result;
import com.example.covid19.mapper.RechargeMapper;
import com.example.covid19.mapper.UserMapper;
import com.example.covid19.service.OrderFormService;
import com.example.covid19.service.UserService;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author BaiZhengChun
 * @since 2022-09-12
 */
@RestController
@RequestMapping("/order-form")
public class OrderFormController {
    private final UserService userService;
    private final UserMapper UserMapper;
    private final RechargeMapper rechargeMapper;
    private final OrderFormService orderFormService;

    public OrderFormController(UserService userService, com.example.covid19.mapper.UserMapper userMapper, RechargeMapper rechargeMapper, OrderFormService orderFormService) {
        this.userService = userService;
        UserMapper = userMapper;
        this.rechargeMapper = rechargeMapper;
        this.orderFormService = orderFormService;
    }

    @RequestMapping("/Recharge")
    public Result Recharge(@RequestBody JSONObject object) {
        return orderFormService.Recharge(object);
    }
}
